<?php
	include_once 'isLogin.php';
	
	$table_name = "focus";
	
	if($_GET['action']=='del'){
		$delFile = array(
				array('key'=>'img','dir'=>'../upload/focus/index/'),
		);
		echo $commonc->del($table_name,$_POST['id'],$delFile);
		exit();
	}

	$sql = $table_name." where class='".$_GET['class']."'";
	$image=$commonc->getList($sql,$sql);
	
	$smarty->assign("image",$image['result']);
	$smarty->assign('page',$image['page']);
	$smarty->display("focus_list.html");
?>